Repository navigation
fix(demo): flag a seeded world an app emulator no longer holds - #21
Merged
Merged
Conversation
added 2 commits
November 9, 2026 19:55
Status reported ready from health checks alone. A restarted Plaid or Xero answers health but has lost the saved access token and invoices, so the page showed three green Ready badges over a run that failed at Connect with INVALID_ACCESS_TOKEN. Check the saved Stripe account, Plaid token and Xero invoice count, and report a vendor that answers with a definite 4xx as stale. A timeout or 5xx is not called stale.
Show an Out of date badge on the vendor, name it in the readiness card and next to the disabled Apply button, and tell the presenter to press Reset. Add the matching row to the troubleshooting guide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The readiness strip reported Ready from health checks alone. Plaid and Xero keep their data in memory, so after a restart they answer health but have lost the access token and invoices the demo saved at seeding. The page showed three green Ready badges, and the first click failed at Connect with
INVALID_ACCESS_TOKEN. This happens whenever an app emulator restarts between a rehearsal and a live demo.Changes
world.Verifychecks that each app emulator still holds what seeding saved: the connected Stripe account, the Plaid access token (/item/get) and the Xero invoice count. Only a definite 4xx counts as stale. A timeout, refused connection or 5xx is not called stale, because the health check already reports those.GET /api/statusgainsstaleand no longer reportsreadywhile any vendor is stale.Tests
New tests:
world/verify_test.go(holds, missing Plaid token, missing Stripe account, short Xero invoices, and no report for a 500 or a refused connection),TestAStaleWorldIsNotReadyUntilItIsResetininternal/api, and aDemoPagetest for the Out of date state.Against real app emulators (WonderTwin
twin-stripe,twin-plaid,twin-xeroon throwaway ports): after Reset the status isready: true. After restartingtwin-plaidit isready: false, stale: [plaid]with the PlaidINVALID_ACCESS_TOKENanswer in the reason. After Reset again it isready: true.Related
Part of making the demo easy to run on a laptop. Next:
doctor, a one-command start, and pinned emulator versions.